/**
 * 
 */
package io.gitee.falllee.dao.model;

import java.io.Serializable;
import java.util.Date;

import org.springframework.stereotype.Component;

import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.gitee.falllee.dao.annotation.Column;

/**
 * @author batty
 *
 */
@Component
public class BaseModel implements Serializable {
	
    private Integer enableFlag;

    private String createUser;

    @JsonFormat(pattern = DaoConst.DATE_PATTERN)
    private Date createDate;

    private String updateUser;

    @JsonFormat(pattern = DaoConst.DATE_PATTERN)
    private Date updateDate;

	private static final long serialVersionUID = 1L;
	
    @Column("${enableFlag}")
    public Integer getEnableFlag() {
    	
        return enableFlag;
    }

    public void setEnableFlag(Integer enableFlag) {
        this.enableFlag = enableFlag;
    }

    @Column("${createUser}")
    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser == null ? null : createUser.trim();
    }

    @Column("${createDate}")
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Column("${updateUser}")
    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser == null ? null : updateUser.trim();
    }

    @Column("${updateDate}")
    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
